package com.design.builder.InnerClass;

import com.design.builder.chain.Course;
import lombok.Data;

public class Course2 {
    private String name;
    private String ppt;
    private String videos;
    private String note;
    private String homework;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPpt() {
        return ppt;
    }

    public void setPpt(String ppt) {
        this.ppt = ppt;
    }

    public String getVideos() {
        return videos;
    }

    public void setVideos(String videos) {
        this.videos = videos;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getHomework() {
        return homework;
    }

    public void setHomework(String homework) {
        this.homework = homework;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("Course2{")
                .append("\"name\":").append(name)
                .append(", \"ppt\":").append(ppt)
                .append(", \"videos\":").append(videos)
                .append(", \"note\":").append(note)
                .append(", \"homework\":").append(homework)
                .append('}');
        return sb.toString();
    }

    public static class Builder{
        private Course2 course = new Course2();
        public Builder addName(String name){
            course.setName(name);
            return this;
        }
        public Builder addPpt(String ppt){
            course.setPpt(ppt);
            return this;
        }
        public Builder addVideo(String video){
            course.setVideos(video);
            return this;
        }
        public Builder addNote(String note){
            course.setNote(note);
            return this;
        }
        public Builder addHomeWork(String homeWork){
            course.setHomework(homeWork);
            return this;
        }
        public Course2 builder(){
            return course;
        }
    }
}